package com.yatb.trac.service.impl;

import com.yatb.trac.pojo.Utenti;
import com.yatb.trac.service.MailSenderService;
import com.yatb.trac.service.TracSetupCreateUserMessagePreparator;

public class CreateUserMailSenderService extends MailSenderService {

	@Override
	public void sendMessage(Object... params) throws Exception {
		sendMessage((Utenti) params[0],(String)params[1]);
	}

	public void sendMessage(Utenti utente,String url)  throws Exception {
		TracSetupCreateUserMessagePreparator messagePreparator = new TracSetupCreateUserMessagePreparator(utente,url);
		messagePreparator.setFrom(getFrom());
		getMailSender().send(messagePreparator);
	}

}
